#include "datafile.hpp"
#include <iostream>
#include <game.hpp>

#include "Applejack/world.hpp"

using namespace Shiny;

int main(int argc, char** argv)
{
  if (argc == 2)
  {
    DataTree* file = DataTree::Factory::Yaml(argv[1]);

    if (file)
    {
      Game game(file);

      delete file;
      return (game.Execute());
    }
    if (file)
      Applejack::World::Factory::New("", Data()); // Find out how to force linking of applejack without this bullshit
  }
  std::cerr << "Usage: ./shinygami [file.yml]" << std::endl;
  return (-1);
}